<!DOCTYPE html>
<html class="no-js">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
    <title>WireField</title>
    <link href="../../../images/logo-icon.svg" rel="icon" type="image/svg">
    <script>var pathToRoot = "../../../";</script>
    <script>document.documentElement.classList.replace("no-js","js");</script>
    <script>const storage = localStorage.getItem("dokka-dark-mode")
    if (storage == null) {
        const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
        if (osDarkSchemePreferred === true) {
            document.getElementsByTagName("html")[0].classList.add("theme-dark")
        }
    } else {
        const savedDarkMode = JSON.parse(storage)
        if(savedDarkMode === true) {
            document.getElementsByTagName("html")[0].classList.add("theme-dark")
        }
    }
    </script>
<script type="text/javascript" src="https://unpkg.com/kotlin-playground@1/dist/playground.min.js" async="async"></script>
<script type="text/javascript" src="../../../scripts/sourceset_dependencies.js" async="async"></script>
<link href="../../../styles/style.css" rel="Stylesheet">
<link href="../../../styles/main.css" rel="Stylesheet">
<link href="../../../styles/prism.css" rel="Stylesheet">
<link href="../../../styles/logo-styles.css" rel="Stylesheet">
<link href="../../../styles/font-jb-sans-auto.css" rel="Stylesheet">
<script type="text/javascript" src="../../../scripts/clipboard.js" async="async"></script>
<script type="text/javascript" src="../../../scripts/navigation-loader.js" async="async"></script>
<script type="text/javascript" src="../../../scripts/platform-content-handler.js" async="async"></script>
<script type="text/javascript" src="../../../scripts/main.js" defer="defer"></script>
<script type="text/javascript" src="../../../scripts/prism.js" async="async"></script>
<script type="text/javascript" src="../../../scripts/symbol-parameters-wrapper_deferred.js" defer="defer"></script>
</head>
<body>
    <div class="root">
<nav class="navigation" id="navigation-wrapper">
    <div class="navigation--inner">
        <div class="navigation-title">
            <button class="menu-toggle" id="menu-toggle" type="button">toggle menu</button>
            <div class="library-name">
                    <a class="library-name--link" href="../../../index.html">
                            wire-runtime
                    </a>
            </div>
            <div class="library-version">
5.1.0            </div>
        </div>
        <div class="filter-section" id="filter-section">
                <button class="platform-tag platform-selector common-like" data-active="" data-filter=":wire-runtime:dokkaHtml/commonMain">common</button>
        </div>
    </div>
    <div class="navigation-controls">
        <button class="navigation-controls--btn navigation-controls--theme" id="theme-toggle-button" type="button">switch theme</button>
        <div class="navigation-controls--btn navigation-controls--search" id="searchBar" role="button">search in API</div>
    </div>
</nav>
        <div id="container">
            <div class="sidebar" id="leftColumn">
                <div class="sidebar--inner" id="sideMenu"></div>
            </div>
            <div id="main">
<div class="main-content" data-page-type="classlike" id="content" pageIds="wire-runtime::com.squareup.wire/WireField///PointingToDeclaration//-519790334">
  <div class="breadcrumbs"><a href="../../../index.html">wire-runtime</a><span class="delimiter">/</span><a href="../index.html">com.squareup.wire</a><span class="delimiter">/</span><span class="current">WireField</span></div>
  <div class="cover ">
    <h1 class="cover"><span>Wire</span><wbr></wbr><span><span>Field</span></span></h1>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":wire-runtime:dokkaHtml/commonMain"><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><span data-unresolved-link="kotlin.annotation/Target///PointingToDeclaration/"><span class="token annotation builtin">Target</span></span><span class="token punctuation">(</span><span>allowedTargets<span class="token operator"> = </span><span class="token punctuation">[</span><span><span data-unresolved-link="kotlin.annotation/AnnotationTarget.FIELD///PointingToDeclaration/">AnnotationTarget.FIELD</span></span><wbr></wbr><span class="token punctuation">]</span></span><wbr></wbr><span class="token punctuation">)</span></div></div><span class="token keyword">annotation class </span><a href="index.html">WireField</a><span class="token punctuation">(</span><span class="parameters "><span class="parameter "><span class="token keyword">val </span>tag<span class="token operator">: </span><span data-unresolved-link="kotlin/Int///PointingToDeclaration/">Int</span><span class="token punctuation">, </span></span><span class="parameter "><span class="token keyword">val </span>keyAdapter<span class="token operator">: </span><span data-unresolved-link="kotlin/String///PointingToDeclaration/">String</span><span class="token operator"> = </span><span class="token string">&quot;&quot;</span><span class="token punctuation">, </span></span><span class="parameter "><span class="token keyword">val </span>adapter<span class="token operator">: </span><span data-unresolved-link="kotlin/String///PointingToDeclaration/">String</span><span class="token punctuation">, </span></span><span class="parameter "><span class="token keyword">val </span>label<span class="token operator">: </span><a href="-label/index.html">WireField.Label</a><span class="token operator"> = </span>Label.OPTIONAL<span class="token punctuation">, </span></span><span class="parameter "><span class="token keyword">val </span>redacted<span class="token operator">: </span><span data-unresolved-link="kotlin/Boolean///PointingToDeclaration/">Boolean</span><span class="token operator"> = </span><span class="token boolean">false</span><span class="token punctuation">, </span></span><span class="parameter "><span class="token keyword">val </span>declaredName<span class="token operator">: </span><span data-unresolved-link="kotlin/String///PointingToDeclaration/">String</span><span class="token operator"> = </span><span class="token string">&quot;&quot;</span><span class="token punctuation">, </span></span><span class="parameter "><span class="token keyword">val </span>jsonName<span class="token operator">: </span><span data-unresolved-link="kotlin/String///PointingToDeclaration/">String</span><span class="token operator"> = </span><span class="token string">&quot;&quot;</span><span class="token punctuation">, </span></span><span class="parameter "><span class="token keyword">val </span>oneofName<span class="token operator">: </span><span data-unresolved-link="kotlin/String///PointingToDeclaration/">String</span><span class="token operator"> = </span><span class="token string">&quot;&quot;</span><span class="token punctuation">, </span></span><span class="parameter "><span class="token keyword">val </span>schemaIndex<span class="token operator">: </span><span data-unresolved-link="kotlin/Int///PointingToDeclaration/">Int</span><span class="token operator"> = </span>-1</span></span><span class="token punctuation">)</span></div><p class="paragraph">Annotates generated <a href="../-message/index.html">Message</a> fields with metadata for serialization and deserialization.</p></div></div>
  </div>
  <div class="tabbedcontent">
    <div class="tabs-section" tabs-section="tabs-section"><button class="section-tab" data-active="" data-togglable="CONSTRUCTOR,TYPE,PROPERTY,FUNCTION">Members</button></div>
    <div class="tabs-section-body">
      <div data-togglable="TYPE">
        <h2 class="">Types</h2>
        <div class="table"><a data-name="2026224119%2FClasslikes%2F-519790334" anchor-label="Label" id="2026224119%2FClasslikes%2F-519790334" data-filterable-set=":wire-runtime:dokkaHtml/commonMain"></a>
          <div class="table-row" data-filterable-current=":wire-runtime:dokkaHtml/commonMain" data-filterable-set=":wire-runtime:dokkaHtml/commonMain">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="-label/index.html"><span><span>Label</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="2026224119%2FClasslikes%2F-519790334"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":wire-runtime:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">enum </span><a href="-label/index.html">Label</a> : <span data-unresolved-link="kotlin/Enum///PointingToDeclaration/">Enum</span><span class="token operator">&lt;</span><a href="-label/index.html">WireField.Label</a><span class="token operator">&gt; </span></div><div class="brief "><p class="paragraph">A protocol buffer label.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div data-togglable="PROPERTY">
        <h2 class="">Properties</h2>
        <div class="table"><a data-name="66945257%2FProperties%2F-519790334" anchor-label="adapter" id="66945257%2FProperties%2F-519790334" data-filterable-set=":wire-runtime:dokkaHtml/commonMain"></a>
          <div class="table-row" data-filterable-current=":wire-runtime:dokkaHtml/commonMain" data-filterable-set=":wire-runtime:dokkaHtml/commonMain">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="adapter.html"><span><span>adapter</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="66945257%2FProperties%2F-519790334"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":wire-runtime:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">val </span><a href="adapter.html">adapter</a><span class="token operator">: </span><span data-unresolved-link="kotlin/String///PointingToDeclaration/">String</span></div><div class="brief "><p class="paragraph">Reference to the static field that holds a <a href="../-proto-adapter/index.html">ProtoAdapter</a> that can encode and decode this field's values. The reference is a string like <code class="lang-kotlin">com.squareup.wire.protos.person.Person#ADAPTER</code> and contains a fully-qualified class name followed by a hash symbol and a field name.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="3196093%2FProperties%2F-519790334" anchor-label="declaredName" id="3196093%2FProperties%2F-519790334" data-filterable-set=":wire-runtime:dokkaHtml/commonMain"></a>
          <div class="table-row" data-filterable-current=":wire-runtime:dokkaHtml/commonMain" data-filterable-set=":wire-runtime:dokkaHtml/commonMain">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="declared-name.html"><span>declared</span><wbr></wbr><span><span>Name</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="3196093%2FProperties%2F-519790334"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":wire-runtime:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">val </span><a href="declared-name.html">declaredName</a><span class="token operator">: </span><span data-unresolved-link="kotlin/String///PointingToDeclaration/">String</span></div><div class="brief "><p class="paragraph">Name of this field as declared in the proto schema. This value is set to a non-empty string only when the declared name differs from the generated one; for instance, a proto field named <code class="lang-kotlin">final</code> generated in Java will be renamed to <code class="lang-kotlin">final_</code>.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="1178653007%2FProperties%2F-519790334" anchor-label="jsonName" id="1178653007%2FProperties%2F-519790334" data-filterable-set=":wire-runtime:dokkaHtml/commonMain"></a>
          <div class="table-row" data-filterable-current=":wire-runtime:dokkaHtml/commonMain" data-filterable-set=":wire-runtime:dokkaHtml/commonMain">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="json-name.html"><span>json</span><wbr></wbr><span><span>Name</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1178653007%2FProperties%2F-519790334"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":wire-runtime:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">val </span><a href="json-name.html">jsonName</a><span class="token operator">: </span><span data-unresolved-link="kotlin/String///PointingToDeclaration/">String</span></div><div class="brief "><p class="paragraph">Name representing this field as it should be used in JSON. This value is set to a non-empty string only when the json name differs from the name as declared in the proto schema.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="-1381184942%2FProperties%2F-519790334" anchor-label="keyAdapter" id="-1381184942%2FProperties%2F-519790334" data-filterable-set=":wire-runtime:dokkaHtml/commonMain"></a>
          <div class="table-row" data-filterable-current=":wire-runtime:dokkaHtml/commonMain" data-filterable-set=":wire-runtime:dokkaHtml/commonMain">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="key-adapter.html"><span>key</span><wbr></wbr><span><span>Adapter</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1381184942%2FProperties%2F-519790334"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":wire-runtime:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">val </span><a href="key-adapter.html">keyAdapter</a><span class="token operator">: </span><span data-unresolved-link="kotlin/String///PointingToDeclaration/">String</span></div><div class="brief "><p class="paragraph">Reference to the static field that holds a <a href="../-proto-adapter/index.html">ProtoAdapter</a> that can encode and decode this field's keys. This only applies to maps. See <a href="adapter.html">adapter</a> for a description of the value format.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="-751746140%2FProperties%2F-519790334" anchor-label="label" id="-751746140%2FProperties%2F-519790334" data-filterable-set=":wire-runtime:dokkaHtml/commonMain"></a>
          <div class="table-row" data-filterable-current=":wire-runtime:dokkaHtml/commonMain" data-filterable-set=":wire-runtime:dokkaHtml/commonMain">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="label.html"><span><span>label</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-751746140%2FProperties%2F-519790334"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":wire-runtime:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">val </span><a href="label.html">label</a><span class="token operator">: </span><a href="-label/index.html">WireField.Label</a></div><div class="brief "><p class="paragraph">The field's protocol buffer label, one of <a href="-label/-o-p-t-i-o-n-a-l/index.html">Label.OPTIONAL</a>, <a href="-label/-r-e-q-u-i-r-e-d/index.html">Label.REQUIRED</a>, <a href="-label/-r-e-p-e-a-t-e-d/index.html">Label.REPEATED</a>, <a href="-label/-p-a-c-k-e-d/index.html">Label.PACKED</a>, or <a href="-label/-o-m-i-t_-i-d-e-n-t-i-t-y/index.html">Label.OMIT_IDENTITY</a>. Defaults to <a href="-label/-o-p-t-i-o-n-a-l/index.html">Label.OPTIONAL</a>.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="-994134864%2FProperties%2F-519790334" anchor-label="oneofName" id="-994134864%2FProperties%2F-519790334" data-filterable-set=":wire-runtime:dokkaHtml/commonMain"></a>
          <div class="table-row" data-filterable-current=":wire-runtime:dokkaHtml/commonMain" data-filterable-set=":wire-runtime:dokkaHtml/commonMain">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="oneof-name.html"><span>oneof</span><wbr></wbr><span><span>Name</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-994134864%2FProperties%2F-519790334"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":wire-runtime:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">val </span><a href="oneof-name.html">oneofName</a><span class="token operator">: </span><span data-unresolved-link="kotlin/String///PointingToDeclaration/">String</span></div><div class="brief "><p class="paragraph">Name of the oneof this field belongs to. This value is set to a non-empty string only if the field is part of a oneof.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="1246057154%2FProperties%2F-519790334" anchor-label="redacted" id="1246057154%2FProperties%2F-519790334" data-filterable-set=":wire-runtime:dokkaHtml/commonMain"></a>
          <div class="table-row" data-filterable-current=":wire-runtime:dokkaHtml/commonMain" data-filterable-set=":wire-runtime:dokkaHtml/commonMain">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="redacted.html"><span><span>redacted</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1246057154%2FProperties%2F-519790334"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":wire-runtime:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">val </span><a href="redacted.html">redacted</a><span class="token operator">: </span><span data-unresolved-link="kotlin/Boolean///PointingToDeclaration/">Boolean</span><span class="token operator"> = </span><span class="token boolean">false</span></div><div class="brief "><p class="paragraph">Redacted fields are omitted from toString() to protect sensitive data. Defaults to false.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="-1013001913%2FProperties%2F-519790334" anchor-label="schemaIndex" id="-1013001913%2FProperties%2F-519790334" data-filterable-set=":wire-runtime:dokkaHtml/commonMain"></a>
          <div class="table-row" data-filterable-current=":wire-runtime:dokkaHtml/commonMain" data-filterable-set=":wire-runtime:dokkaHtml/commonMain">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="schema-index.html"><span>schema</span><wbr></wbr><span><span>Index</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1013001913%2FProperties%2F-519790334"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":wire-runtime:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">val </span><a href="schema-index.html">schemaIndex</a><span class="token operator">: </span><span data-unresolved-link="kotlin/Int///PointingToDeclaration/">Int</span></div><div class="brief "><p class="paragraph">This is the order that this field was declared in the <code class="lang-kotlin">.proto</code> schema.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="-1054456706%2FProperties%2F-519790334" anchor-label="tag" id="-1054456706%2FProperties%2F-519790334" data-filterable-set=":wire-runtime:dokkaHtml/commonMain"></a>
          <div class="table-row" data-filterable-current=":wire-runtime:dokkaHtml/commonMain" data-filterable-set=":wire-runtime:dokkaHtml/commonMain">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="tag.html"><span><span>tag</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1054456706%2FProperties%2F-519790334"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":wire-runtime:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">val </span><a href="tag.html">tag</a><span class="token operator">: </span><span data-unresolved-link="kotlin/Int///PointingToDeclaration/">Int</span></div><div class="brief "><p class="paragraph">The tag number used to store the field's value.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
      <div class="footer">
        <span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2025 Copyright</span><span
                class="pull-right"><span>Generated by </span><a
                href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span>
      </div>
            </div>
        </div>
    </div>
</body>
</html>
